#include<stdio.h>

int main(void)
{
    double f,c;
    scanf("%lf",&f);
    c=5.0/9.0*(f-32.0);
    printf("%lf\n",c);
    return 0;
}
